
package com.probiz.estore.product.service.dwr;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.MessageSource;

import com.probiz.estore.common.model.product.Brand;
import com.probiz.estore.product.model.BrandVO;
import com.probiz.estore.product.service.BrandManager;

public class BrandDwrImpl {
	protected final transient Log	log				= LogFactory
															.getLog(getClass());
	private BrandManager			mgr				= null;

	public List getBrands() {
		List rs = new ArrayList();
		for (Brand brand : mgr.listAll()) {
			BrandVO vo = new BrandVO();
			vo.setBrandId(brand.getBrandId());
			vo.setBrandName(brand.getBrandName());
			rs.add(vo);
		}
		return rs;
	}

	public void setBrandManager(BrandManager manager) {
		mgr = manager;
	}

}
